home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-05 / say22.exe / SAYINGS.DOC < prev    next >
Text File  |  1992-03-01  |  11KB  |  211 lines

  1.  
  2. SAYINGS is a *free* program that displays a "message for the day" on your
  3. screen.  It gets its "sayings" from an easily-modified text file called 
  4. SAYINGS.DAT, so if you have your own quotes that you'd like to add to the 
  5. file, you can do so with any text editor.  Message displays may be in
  6. a color window that disappears when you press a key, or just dumped on
  7. your screen (preferred mode for your AUTOEXEC.BAT file, so you don't have
  8. to press a key, and you'll have something to read while all that stuff 
  9. loads!).
  10.  
  11.  
  12. >-
  13. >-  Using SAYINGS
  14. >-
  15. The sayings program is easy to use, just type SAYINGS at the DOS prompt
  16. and it will select a quote from the SAYINGS.DAT file and display it on
  17. your screen in a color window in the center of your screen.  You can add
  18. your own quotes (see 'The SAYINGS.DAT File'), or even keep separate data
  19. files for each user on your network.  Sayings normally looks for its 
  20. data in the same directory that it resides in, but you can keep it anywhere
  21. you like.  Let's talk about some of the options you can use with SAYINGS.
  22.  
  23.  
  24. >-
  25. >-  Command-Line Options
  26. >-
  27. The /? Option: Help Screen
  28. If you need a quick display of all of the command-line options for SAYINGS,
  29. use the /? or -? option (you can use a / or - with any of the options).  In
  30. other words, just type SAYINGS /?.
  31.  
  32. The /C# Option: Selecting Colors
  33. The default mode for SAYINGS is window mode.  There are seven colorsets
  34. that can be selected for the window colors by using the /C# option, where
  35. # is a number from 1 to 7.  Try them all and select one that pleases you.
  36. If you have a monochrome monitor, try number 7.
  37.  
  38. The /T Option: Text mode
  39. If you don't like the windows, or you want to display a saying without 
  40. requiring a keypress to continue processing, use text mode.  If you type
  41. SAYINGS /T, you'll get a flat ascii dump of a message on your screen, and
  42. it won't wait for you to press a key.  This is most handy in batch files;
  43. I have several (including my AUTOEXEC file) that display a message in text
  44. mode and then continue with several other tasks that take a while to execute.
  45.  
  46. Using a Different Data File
  47. You can use SAYINGS with any file that contains a list of quotes that it
  48. understands; it doesn't have to be called SAYINGS.DAT, and it doesn't have
  49. to reside in the same directory as SAYINGS.EXE.  Just give SAYINGS a path
  50. specification for the file that you want to use, and it will attempt to
  51. read that file and select a saying from it.  If the file can't be found, 
  52. you'll get an error message.
  53.  
  54. The ability to keep SAYINGS.EXE and SAYINGS.DAT in separate directories
  55. is handy on networks.  You can keep the EXE file in a protected area, and
  56. the DAT file someplace where everyone can add their own.  Better yet, you
  57. can have one in each user's home directory.  If you have an environment
  58. variable called USR set to the user's login name (as most networks do),
  59. just run SAYINGS in the login script as SAYINGS F:\USERS\%usr%\SAYINGS.DAT
  60. or SAYINGS F:\COMMON\%usr%.DAT.
  61.  
  62.  
  63.  
  64. >-
  65. >-  The SAYINGS.DAT File
  66. >-
  67. Adding your own sayings to the "database" is easy.  Open SAYINGS.DAT
  68. with your favorite text editor, and you'll quickly see how it works.
  69. Each line in the file is one complete "saying", and sayings can span
  70. multiple lines by separating them with a '|' character.  For instance,
  71. this line:
  72.  
  73. Fact:||Red lights always last|longer than green ones.
  74.  
  75. will appear as a 4 line message on the screen (there's a blank line 
  76. after "Fact:").  If I didn't explain that clearly enough, just open up 
  77. SAYINGS.DAT and take a look, I'm sure it'll be pretty apparent to you.
  78.  
  79. A few notes about the SAYINGS.DAT file follow.  You may have noticed 
  80. that the sayings I gave you (over 850 of them!) are in sorted order.
  81. There's no reason for that other than my own cravings for neatness; the
  82. sayings may be listed in any order.  Keep in mind that longer sayings
  83. have a greater chance of being selected than shorter ones, so you may
  84. want to refrain from adding quotes that are several paragraphs long.
  85. Also, make sure that each line in the saying are short enough to fit
  86. on your screen.  If you have an 80-column screen and you add a saying
  87. that's 90 columns long, SAYINGS will give you an error message when it
  88. tries to display that particular message in a window (see the section 
  89. on SAYCHK to check for oversized messages!) or, if you're running in
  90. text mode, it will wrap around on the screen.  Just add a '|' somewhere
  91. in the middle to break it into two lines, and you'll be fine!
  92.  
  93. As you're adding your sayings you may want to see them to make sure 
  94. that they're centered properly, or whatever.  Here's a little trick:
  95. just put your saying into a file all by itself, and then tell SAYINGS
  96. to use that file as its data file.  If you've put it in a file called
  97. MINE, type SAYINGS MINE.
  98.  
  99. Some folks have also asked for the ability to view all of the sayings
  100. in sequential order.  If you've really got the time for that sort of
  101. thing, use the SAYINGS /A option.  In text mode, you'll be prompted
  102. for a "Q" to quit, and in window mode a CONTROL-C will pop you out.
  103.  
  104.  
  105. >-
  106. >-  The SAYCHK and SSTRIP Utilities
  107. >-
  108. In the early days of SAYINGS, users would get a "Message too long" error
  109. occasionally, but no indication of which message was too long to fit in
  110. a window or where it was in the file.  There are now two ways to avoid 
  111. this: the SAYCHK utility and the SSTRIP utility.
  112.  
  113. The SAYCHK utility will search through your entire SAYINGS.DAT file
  114. looking for messages that won't fit in a window on your screen.  When
  115. it finds one, it tells you what line number it is on, and prints a
  116. copy of that message on your screen.  That way, you can ensure that
  117. you (or anyone else) will never be disappointed by a "Message too
  118. long" error.
  119.  
  120.  
  121. If you just run SAYCHK, it will look for SAYINGS.DAT in the current 
  122. directory.  If you want to check any other file you have to specify a
  123. path to that file.  For instance, you can run SAYCHK D:\QUIPS.TXT.
  124.  
  125. The important part to remember is that SAYCHK only checks that the sayings
  126. can be displayed on the _current_ video screen.  So if you're in 132 column
  127. mode and you run SAYCHK, it will assure you that none of the sayings are
  128. too long to be displayed on a 132 column screen.  But if you switch to
  129. 80 column mode later, you could still encounter a message that is too long
  130. for your screen.  The best idea is to switch to the smallest screen that
  131. you'll ever use before you run SAYCHK.  For most people, this discussion is
  132. irrelevant; most displays are 80 columns by 25 lines, so just run SAYCHK 
  133. once after you've added your new sayings and forget about it.
  134.  
  135. If you need it, SAYCHK also has a help screen that can be viewed with the 
  136. /? option.
  137.  
  138. SSTRIP is a similar utility.  Instead of just giving you line numbers of
  139. the bad ones, SSTRIP pulls out the bad ones and puts them into a separate
  140. file so that you can easily edit them one by one and then merge them with
  141. the others when you're through.  SSTRIP is run as SSTRIP <filename> or
  142. just SSTRIP alone if you have a SAYINGS.DAT in the current directory;
  143. it will then generate a SAYINGS.OK and a SAYINGS.BAD for you.  The rest
  144. is up to you.
  145.  
  146.  
  147. >-
  148. >-  Why FreeWare?
  149. >-
  150. This program is provided to you as freeware, mostly because I'm tired of
  151. seeing people trying to make money off of trivial programs, *especially* 
  152. the ones that display obnoxious messages with lots of long beeps telling 
  153. you that you should send all your money to someone who just figured out 
  154. how to use their compiler.  This program is at least as good as any other
  155. similar package out there, features easily customized messages, and it's 
  156. free!  Shareware is a great concept; let's not ruin it with greed.
  157.  
  158. This program carries no warranty of any kind, use it at your own risk; the
  159. author will not be held responsible for any damages to your system caused
  160. by use of the program, though it would be truly interesting to hear how
  161. someone could possibly hurt themselves with something as harmless as
  162. this.  No upgrades or revisions to this program are planned, but more
  163. unlikely accidents have happened in the past.  If you have comments, 
  164. suggestions, insults, bug reports, or whatever drop me a line by either 
  165. US Mail or CompuServe eMail (please don't phone).  If you send a disk,
  166. a self-addressed stamped envelope, and maybe a neighborly letter I'll 
  167. send you even more free goodies that I've cooked up over the years!
  168.  
  169.                    Scott Wertz   CompuServe 71541,3051
  170.                    9740 Michael Drive
  171.                    Streetsboro, OH  44241
  172.  
  173.  
  174.  
  175. >-
  176. >-  Version Release Information
  177. >-
  178.  
  179. SAYINGS Version 1.0  Initial Release.  Displays sayings in a color window
  180.                      of variable size.  Posted on CompuServe IBMNEW forum.
  181.                      This version also appeared in "Stupid PC Tricks" by
  182.                      Bob LeVitus and Ed Tittel, Addison Wesley Publishing
  183.                      Company (c)1991.  ISBN 0-201-57759-3.  Thanx Ed!
  184.         Version 1.1  Added ability to specify a data file other than
  185.                      SAYINGS.DAT, possibly in a different directory.
  186.         Version 1.2  Replaced the random number generator - some sayings
  187.                      were never being displayed!
  188.  
  189.         Version 2.0  Complete rewrite.
  190.                      Ported from Microsoft C to Borland C.
  191.                      Rewrote window-drawing routines, added colorsets.
  192.                      Replaced random number generator again, better than ever.
  193.                      Added /TEXT option to bypass windows.
  194.                      Added help screen.
  195.                      Included SAYCHK utility.
  196.                      Posted on CompuServe.
  197.         Version 2.1  Fixed bug in SAYCHK so that it checks for
  198.                      the same max window size as SAYINGS does.
  199.         Version 2.2  Fixed bug in SAYINGS random number generator.  
  200.                      Previous versions could not handle large data
  201.                      files;  anything after byte offset 65535 was ignored.
  202.                      Replaced Borland's buggy mktime() function with my
  203.                      own.  Theirs would occasionally report the wrong day
  204.                      of the week, and crashed entirely on February 29 
  205.                      (leap years).
  206.                      Fixed bug that resulted in an incomplete message 
  207.                      when the first saying in the data file was selected.
  208.                      Added the /A option to view All sayings sequentially.
  209.                      Added the SSTRIP utility.
  210.                      Posted on CompuServe.
  211.